<%@ page language="java" import="java.util.*;" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
					  + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath %>">
    <title>My JSP 'tree.jsp' starting page</title>
	<link href="<%=basePath %>YUI/2.6.0/build/fonts/fonts-min.css" rel="stylesheet" type="text/css" />
	<link href="<%=basePath %>YUI/2.6.0/build/treeview/assets/skins/sam/treeview.css" rel="stylesheet" type="text/css" />
	<script src="<%=basePath %>YUI/2.6.0/build/yahoo-dom-event/yahoo-dom-event.js" type="text/javascript"></script>
	<script src="<%=basePath %>YUI/2.6.0/build/treeview/treeview-min.js" type="text/javascript"></script>
    <link rel="stylesheet" href="../css/adminStyle.css" type="text/css" /><link rel="stylesheet" href="../css/adminStyle.css" type="text/css" />
  </head>
  <body>
  <div id="yuitree1">
  <ul>
  <li><a target="main" href="<%=basePath %>admin/collegeService.do?method=listCollege" title="内蒙古工业大学">内蒙古工业大学</a>
  	<c:if test="${! empty collegeList}">
  	<ul>
  	  <c:forEach var="college" items="${collegeList}">
   		 	<li><a target="main" href="<%=basePath %>admin/departmentService.do?method=listDepartment&collegeId=${college.id}" title="${college.name }&nbsp;&nbsp;学院">${college.name }&nbsp;&nbsp;学院</a>
   		 	
   		 		<c:if test="${! empty college.departments}">
   		 			<ul>
				  	  <c:forEach var="department" items="${college.departments}">
				   		 	<li><a target="main" href="<%=basePath %>admin/specialtyService.do?method=listSpecialty&departmentId=${department.id}" title="${department.name }&nbsp;&nbsp;系">${department.name }&nbsp;&nbsp;系</a>
				   		 	
				   		 	   	<c:if test="${! empty department.specialties}">
				   		 			<ul>
								  	  <c:forEach var="specialty" items="${department.specialties}">
								   		 	<li><a target="main" href="<%=basePath %>admin/myClassService.do?method=listMyClass&specialtyId=${specialty.id}" title="${specialty.name }&nbsp;&nbsp;专业">${specialty.name }&nbsp;&nbsp;专业</a>
								   		 		<c:if test="${! empty department.specialties}">
				   		 							<ul>
								  	 					<c:forEach var="classes" items="${specialty.myClasses}">
								   		 					<li><a target="main" href="<%=basePath %>admin/studentService.do?method=listStudent&myClassId=${classes.id}" title="${classes.name }&nbsp;&nbsp;班">${classes.name }&nbsp;&nbsp;班</a>
								   		 					</li>
													   	</c:forEach>
													</ul>
									   		 	</c:if>
								   		 	</li>
								   	  </c:forEach>
								   	</ul>
				   		 		</c:if>
				   		 	</li>
				   	  </c:forEach>
				   	</ul>
   		 		</c:if>
   		 	</li>
   	 </c:forEach>
   	 </ul>
    </c:if>
    </li>
    </ul>
    </div>
    <script type="text/javascript">
		// BeginWebWidget YUI_TreeView: yuitree1 
		    var yuitree1 = new YAHOO.widget.TreeView("yuitree1");
		    yuitree1.render();
		// EndWebWidget YUI_TreeView: yuitree1 
	</script>
  </body>
</html>